@tailwind base;
@tailwind components;
@tailwind utilities;

body {
  overflow-anchor: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@responsive {
  .downarrow-offset {
    top: 80px;
    left: 575px;
  }

  .downarrow-flush {
    top: 0px;
    left: 350px;
  }
}

@responsive {
  .h-scrollable {
    height: 400px
  }
}

.post p {
  font-size: 17px;
  line-height: 1.83;
}

.post > * {
  @apply my-16;
  @apply mx-auto;
}

/* Put any stupid embedded widgets here that try to enforce their own
   y margin and override them */
.post > twitter-widget {
  @apply my-16 !important;
}

.post > p,
.post > ul,
.post > ol,
.post > ul p,
.post > ol p {
  @apply mb-6;
  @apply mt-0;
}

.post a, .post a:visited, .post a:active, .formkit-form a {
  @apply underline;
}

.post h1, .post h2, .post h3, .post h4 {
  @apply text-blue-600 font-blog-display tracking-tight leading-tight;
}

.post h1 {
  @apply text-4xl leading-none;
  line-height: 1.1em;
}
.post h2 {
  @apply text-3xl mt-16 mb-4;
}
.post h3 {
  @apply text-2xl mt-16 mb-4;
}
.post h4 {
  @apply text-xl mt-12 mb-4;
}

.post img {
  @apply mb-16 mt-16 shadow-md rounded mx-auto;
}

.post code {
  font-size: .9em;
}

.post pre code {
  font-size: .95em;
}

.post pre {
  @apply mb-16 mt-16 rounded-lg p-5 -ml-5 -mr-5 shadow-md;
  background-color: #fafafa;
}

@media screen and (max-width: 640px) {
  .post pre {
    @apply ml-0 mr-0;
  }
}

.post ol {
  @apply list-decimal;
}

.post ul {
  @apply list-disc;
}

.post li {
  @apply my-6;
  margin-left: 0;
  line-height: 1.75;
  font-size: 17px;
}

.post .figure-label {
  text-align: center;
  font-size: .9em;
  line-height: 1.5em;
  font-style: italic;
  width: 500px;
  margin-left: auto;
  margin-right: auto;
  margin-top: -2rem;
  @apply mb-12;
}

.spreadsheet-with-graph {
  margin-left: -200px;
  margin-right: -200px;
  display: flex;
}

.spreadsheet-with-graph.alone {
  margin-left: 0;
  margin-right: 0;
}

.spreadsheet-with-graph .graph {
    width: 468.19407008086256px;
    height: 289.5px;
}

.spreadsheet-with-graph.alone .graph-container {
  margin: 0 auto;
}

.spreadsheet-with-graph .spreadsheet {
  flex: 1;
  margin-right: 10px;
}

@media screen and (max-width: 1100px) {
  .spreadsheet-with-graph {
    flex-direction: column;
    align-items: center;
    margin-left: 0;
    margin-right: 0;
  }

  .spreadsheet-with-graph .spreadsheet {
    width: 100%;
    flex: 0 0 250px;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .graph-container {
    max-width: 100%;
    overflow: auto;
    margin: 0 auto;
  }
}

mjx-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px 0;
}

.sidebyside {
  display: flex;
  width: 120%;
  margin-left: -10%;
  margin-top: 0;
}

.sidebyside .left, .sidebyside .right {
  flex: 1
}

.sidebyside .right {
  margin-left: 20px
}

@media screen and (max-width: 900px) {
  .sidebyside {
    width: 100%;
    display: block;
    margin-left: 0;
  }

  .sidebyside .right {
    margin-left: 0
  }
}
